package cn.sdormitory.component.bindValue.annotation;

import cn.sdormitory.component.bindValue.bean.info.StoreInfo;
import cn.sdormitory.component.bindValue.bean.target.StoreTarget;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 绑定值注解 默认只在controller层生效
 * 如需在其它地方使用配合@BindValueMethod注解使用
 * @author lj
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@AnnotationValue(isStoreTarget = true, annotationClass = StoreValue.class, infoClass = StoreInfo.class, targetSuffixName = "StoreQuery")
public @interface StoreValue {
    @AliasFor(annotation = AnnotationValue.class, attribute = "storeTarget")
    StoreTarget target();
    String[] queryFields() default {};
    @AliasFor(annotation = AnnotationValue.class)
    ParamField[] paramFields() default {};
}
